<?php
/**
 * Created by PhpStorm.
 * User: iceberg
 * Date: 2018-10-20
 * Time: 10:40
 */

namespace app\work\controller;


use app\service\GoodsService;
use think\Controller;

class Goods extends Controller
{
    //货物业务
    private $goodsService;
    //初始化
    public function initialize()
    {
        $this->goodsService = new GoodsService();
    }

    //列表分页
    public function index()
    {
        $this->assign('list', $this->goodsService->page());
        $this->assign('count', $this->goodsService->count());
        return $this->fetch();
    }
}